﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using MIDIRemapper.DeviceInterfaces;
using Midi;

namespace MIDIRemapper
{
    public enum RouteType
    {
        Specific = 0,
        Global = 1,
        Transpose = 2,
        Channel = 3,
        NotSure
    }

    public static class RouteTypeExtensions
    {
        public static RouteType GetRouteType(this string s)
        {
            RouteType toReturn = RouteType.NotSure;
            switch (s)
            {
                case "Specific Reroute":
                    toReturn = RouteType.Specific;
                    break;
                case "Global Reroute":
                    toReturn = RouteType.Global;
                    break;
                case "Transpose Value":
                    toReturn = RouteType.Transpose;
                    break;
                case "To Implement":
                    toReturn = RouteType.Channel;
                    break;
            }
            return toReturn;
        }

        public static string GetStringType(this RouteType type)
        {
            string toReturn = "NotSure";
            switch (type)
            {
                case RouteType.Specific:
                    toReturn = "Specific Reroute";
                    break;
                case RouteType.Global:
                    toReturn = "Global Reroute";
                    break;
                case RouteType.Transpose:
                    toReturn = "Transpose Value";
                    break;
                case RouteType.Channel:
                    toReturn = "To Implement";
                    break;
            }
            return toReturn;
        }
    }
}
